#!/bin/bash

SERVER_NAME="data-cdc-server"
ALIVE_PID=`ps -ef | grep -E ${SERVER_NAME}.jar | grep -v grep | awk '{print $2}' | awk -F '/' '{print $NF}' | sed 's/\|.jar\|.jar//g'`
if [ ${ALIVE_PID} != '' ]; then
  echo "killed Service Named = ${SERVER_NAME} PID = ${ALIVE_PID}"
    kill -9 ${ALIVE_PID}
fi
